*** Do File for Politics & Gender Manuscript ***

clear
use "C:\Users\davidmacdonald\Dropbox\Final PAG Union Membership Women Pol Ambition\Clean Houston CES Module 2018.dta"

*** Table 1 ***
probit Anyone_Suggested_Run Ever_Union, r
outreg2 using tab.tex, dec(3) addstat(Pseudo R2, e(r2_p)) replace
probit Anyone_Suggested_Run Ever_Union Female Age White i.Educ3 , r
outreg2 using tab.tex, dec(3) addstat(Pseudo R2, e(r2_p)) append
probit Anyone_Suggested_Run c.Ever_Union##c.Female Age White i.Educ3 , r
outreg2 using tab.tex, dec(3) addstat(Pseudo R2, e(r2_p)) append

oprobit Qualification_for_Office Ever_Union, r
outreg2 using tab.tex, dec(3) addstat(Pseudo R2, e(r2_p)) replace
oprobit Qualification_for_Office Ever_Union Female Age White i.Educ3, r
outreg2 using tab.tex, dec(3) addstat(Pseudo R2, e(r2_p)) append
oprobit Qualification_for_Office c.Ever_Union##c.Female Age White i.Educ3, r
outreg2 using tab.tex, dec(3) addstat(Pseudo R2, e(r2_p)) append 


clear 
use "C:\Users\davidmacdonald\Dropbox\Final PAG Union Membership Women Pol Ambition\Clean Cumulative CES 2010 to 2022.dta"
* svyset [pweight=weight_cumulative] - only need to run once

*** Table 2 ***
svy: mean Ever_Run_Office if Ever_Union==0 & Female==0
svy: mean Ever_Run_Office if Ever_Union==1 & Female==0

svy: mean Ever_Run_Office if Ever_Union==0 & Female==1
svy: mean Ever_Run_Office if Ever_Union==1 & Female==1


clear 
use "C:\Users\davidmacdonald\Dropbox\Final PAG Union Membership Women Pol Ambition\Clean Cumulative CES 2010 to 2022.dta"
* svyset [pweight=weight_cumulative] - only need to run once

*** Table 3 ***
svy: tab Union_Membership_Status
svy: tab Union_Membership_Status if Female==0
svy: tab Union_Membership_Status if Female==1

svy: tab Ever_Run_Office
svy: tab Ever_Run_Office if Female==0
svy: tab Ever_Run_Office if Female==1


clear 
use "C:\Users\davidmacdonald\Dropbox\Final PAG Union Membership Women Pol Ambition\Clean Cumulative CES 2010 to 2022.dta"

*** Table 4 ***
probit Ever_Run_Office i.Union_Membership_Status ///
Age Married Homemaker Own_Home Children Military_Status i.Race_H_4 i.Education_3 i.Income_3 i.Church_Attend_3 ///
i.State i.Year if Female==1, r
outreg2 using tab.tex, dec(3) sideway asterisk(se) addstat(Pseudo R2, e(r2_p)) replace 

probit Ever_Run_Office i.Union_Membership_Status ///
Age Married Homemaker Own_Home Children Military_Status i.Race_H_4 i.Education_3 i.Income_3 i.Church_Attend_3 Democrat_vs_Rep_or_Indy ///
i.State i.Year if Female==1, r
outreg2 using tab.tex, dec(3) sideway asterisk(se) addstat(Pseudo R2, e(r2_p)) append 


clear 
use "C:\Users\davidmacdonald\Dropbox\Final PAG Union Membership Women Pol Ambition\Clean Cumulative CES 2010 to 2022.dta"

*** Figure 1 ***
probit Ever_Run_Office i.Union_Membership_Status ///
Age Married Homemaker Own_Home Children Military_Status i.Race_H_4 i.Education_3 i.Income_3 i.Church_Attend_3 ///
i.State i.Year if Female==1, r
margins, at(Union_Membership_Status=(1 2 3))
marginsplot


clear 
use "C:\Users\davidmacdonald\Dropbox\Final PAG Union Membership Women Pol Ambition\Clean Cumulative CES 2010 to 2022.dta"
* Each model controls for a 5-category measure of Education (base category of 1 = hs or less; 2 = some college; 3 = two-year degree; 4 = four-year degree; 5 = grad degree) 

*** Figure 2A ***
probit Ever_Run_Office i.Union_Membership_Status ///
Age Married Homemaker Own_Home Children Military_Status i.Race_H_4 i.Education5 i.Income_3 i.Church_Attend_3 ///
i.State i.Year if Female==1 & (Education_3==1), r
margins, at(Union_Membership_Status=(1 2 3))
marginsplot

*** Figure 2B ***
probit Ever_Run_Office i.Union_Membership_Status ///
Age Married Homemaker Own_Home Children Military_Status i.Race_H_4 i.Education5 i.Income_3 i.Church_Attend_3 ///
i.State i.Year if Female==1 & (Education_3==2 | Education_3==3), r
margins, at(Union_Membership_Status=(1 2 3))
marginsplot


clear 
use "C:\Users\davidmacdonald\Dropbox\Final PAG Union Membership Women Pol Ambition\Clean CES Panel 2010 to 2012.dta"

*** Table 5 ***
reg Join_Union_vs_Non_Member Ever_Candidate_2010, r
reg Join_Union_vs_Non_Member Ever_Candidate_2010 if Female_2010==0, r
reg Join_Union_vs_Non_Member Ever_Candidate_2010 if Female_2010==1, r


clear 
use "C:\Users\davidmacdonald\Dropbox\Final PAG Union Membership Women Pol Ambition\Clean Cumulative GSS 1972 to 2022.dta"

*** Table 6 ***
reg Women_Suited_Politics Union_Member i.Year if Female==1, r 
outreg2 using tab.tex, dec(3) replace

reg Women_Suited_Politics Union_Member Mother_Post_HS_Educ i.Year if Female==1, r 
outreg2 using tab.tex, dec(3) append

reg Women_Suited_Politics Union_Member Mother_Worked i.Year if Female==1, r 
outreg2 using tab.tex, dec(3) append

reg Women_Suited_Politics Union_Member Mother_Post_HS_Educ Mother_Worked i.Year if Female==1, r 
outreg2 using tab.tex, dec(3) append


